package com.chen.controller;

import com.chen.common.Result;
import com.chen.service.EchartsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author chen

 */
@RestController
@RequestMapping("/echarts")
@Api(value = "EchartsController",tags = "可视化图表")
public class EchartsController {


    @Resource

    private EchartsService echartsService;


    @GetMapping("/ArticleCount")
    @ApiOperation("文章")
    public Result ArticleCount(){
        return Result.success(echartsService.articleList());
    }

    @ApiOperation("用户")
    @GetMapping("/userSexCount")
    public Result userSexCount(){
        return Result.success(echartsService.userSexCount());
    }

}
